Fixed issues with image uploads