fixed rebounding in the middle