fix error while filetype is empty