Add missing import
Actually make atomic switchover atomic