fixed some bugs which will cause alert exception, and fixed the bug causing data input exception