cleanup and fixing problem with missing mime type