FIXED: use correct y-coordinate $y