Fixed bugs with config