fix enter

Also report an error with end.