Fix bugs with error messages not showing up. Fixes #114