properly handle compile errors