Fixed a bug that caused photos to not display sometimes