Bug fixes (clipping errors, incorrect snapping, zero scale protection)