fixed done callback bug