Fixing bugs after importing code from 'carcass' package