fix a type in error message, and use shorter method name for layout