fix events issue