More fixes, better error message