Fix math for metadata offset