fixing bug when there are no photos available for an specific post