fix bug #123
fixed bug #121
fix some HDInsight bugs.