fixed the lack of a request context in the done function