bug fix at searchspace.lua