fix bug in spaceboxing