sodium: some bugs fixed