Fixed unasigned value error and uniform spatial hash seems to be working