fix edge clipping, SAT and minor fixes