Fix error with missing 'done' function