Fixed issue with promise not properly returning the expected result
Changes from John's suggestions. Thanks dude!