added missing semicolon
improved error messages