fix manaCost code