added check for unexpected compiler errors