Made the configuration more robust