small fixes and thread safe occgrid