minor fix to checkmagic