additional bug in magic numbers check fixed