some fixes for lua port; update mapdb