Bug fix to cube geometry