added a rescuse around phote size which sometimes breaks