Minor changes: missing space in error message and better variable name