Changed auto-compile function