Fixed not changing the mode on initial load