Fix enchant code