fixed some issues with file uploads during the refactor