minor fixes for c# port and update mapdb