Fix bug where done callback would get triggered