bugfix and progress on space ordering