Improves placement of error messages