fixed infoWindow for function scope