Fixing the initMode issue