Updated code to fix.
Fix code to work.
Merge pull request #1 from LordVakar/pull-request

Fixed many things with Magic