added right clipping handling