Clearing the Serial Buffer?

Just read and discard any pending serial data.

Though why you would want to this escapes me. You should have start and end of packet markers. If a packet is bad, you wouldn't know that until you had read the whole packet, so anything still in the buffer is (part of) the next packet.

What you are doing is the equivalent of finding a type on a page, and turning the page, expecting to find a new paragraph at the top of the page. It doesn't work that way.