fix magic