tried to fix magic 8