config reader + fixes