Fixes for some common errors