fixed bug with zero dimensional spaces