fixed typo in compile function