Correctly read version number for mask reading