bug fix with reading from config