Added conditional to make the  requests work.