fixes mode bug

could not read from bootstrap because $mode was reset after reading
from config