Fix to app crashing when trying to submit images