Remove all grammar issues from the following sentence:
When I was driving, a car cut in front of me and I almost bumped its end.
When I was driving, a car cut in front of me, and I almost bumped its rear end.