fix JSLint function order error