Fixed: Removed undeclared variable
Updated version