fixed misreference of close method in global event listener