Fixing var usage