fixed firefox and upload bugs