Fixed a bug where there were no results being returned to the promise