Made configuration more robust