Issue #55 avoidig infinite loop