fixing an issue that occurred when promises were resolved synchronously, adding more tests