fix library crash when firstdatablockposition is invalid