bugfix old-style checksum and add functional tests