Configuration improvement and bug fixes