Adding flag test to handlePostInit, to make sure that it only runs once.