Fixing bug in obstacles initialization