Bug fix. Removed undefined variable