Added proper error for unscoped variables