I found a easier way to fix the bug. Al i had to do was set the verticalVelocity = 0; when u swap characters
Lol that works too and is much easier :P