fix some issues, add test events