Fix bug when compiling single file