Fixed hard and soft clipping bug