Fix compile function