Fixed bouncung issues with nodes reaching boundary.
Fixed Bouncing issue when nodes reach boundary