fixed issue with photos not saving