made config parsing more robust