fix with worng var declaration