misc bugfix, manage config in one script