fix mime_type method and test