fixing the infinite loop