Fixed problem with images not being uploaded