In the same part of scripture we read that God regretted, repented, of ever having created man. Then he obviously changed his mind again.
If God is omniscient and unchanging, what gives with this?
Was God right? Would God be right, now, if he decided to kill those who do not believe?