Variable check added to avoid performing the same request twice