fixed removeBehaviour. added decrement and condition to loop. renamed for consistency