resolved addListener issue by moving it directly after markers.push(marker)