fix a bug in solution
fix bugs for out event