fixed potential error with image uploading block