fix spatial init, and unit test