Bug fix for Ticket #99

Resolved bug .. now using correct variable