Final bugfix on space management