Real fix for PR #915, keep track of the qtables length
Merge pull request #918 from wiredfool/pr_915_fix

Fix for PR #915, keep track of the qtables length