.NET and Java API Bugfix (Codeplex issue 101)

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>