Fixed function scope availability. Avoid arrays empty warning