Fix for changing mode