Fix magic numbers

Found while testing hdcore.