Bug Fixes out of which an infinite loop issue