minor change on how the initial mode is set