Minor performance improvement for fix common errors