Fix checksul calculation