Can gamma ray bursts be used as standard candles?