Fix crashing related to chapter position values being negative