Late minute fix. Waiting for promises to be fulled should be tested before commiting