fixing bug in immersed boundary implementation