fix geometry issues