Improve 'done' clause placement