fixed bugs with smart config