fix to magic