clean child exit
fix bug when method returned undefined