geometry bugfixes