fixed clipping bugs