Fixed missing "promises" var