fixed bugs allowing all file types