The `msg.ended = true;` part should be on the next line and indented two spaces.