fix style and error message