Free-slip bugfix. Added else if branches.