fixed "done" invocation error