Fixing some issues mentioned in codeplex issues I closed