fixed issue: code start to execute when load event is triggered.