Fix warning in getAvailablePositions method
Rename closure that generates positions in listeners