Fixing a small bug in the MagicController.