Waiting for promises to be fulfilled before enabling the state selection button