fixed the major minor calculation

The calcuation was not correct for higher values. ff ff did not lead to 65535, the last 8bit were inverted