Fix a bug in space moving code.