Tweaked setMode to match state machine a bit more.

Signed-off-by: Robert Truong <rtruong2@gmu.edu>