fix Compile function