fix all crash caused by handler