engine fixes, better errors