fixed the bouncing error