Fix mode setting for initial state