Fix bug in the new resolve function to always return a value