fixed some geometry issues