fix the then not returning the argument to allow chaining