Fixes for shapes intersection detection