changes to magic prefix code