fix client validation and improved config