Fixed a bug when trying to convert a file