Fixed a few bugs in Auxchain code