Clean up the token before parsing