fix js issue, reference window