[db] several bug fixes - including band reordering bug.