Fixed infinite sliding bug