Bug fix: was using wrong variable