fix bug where getEntry callback would be called twice