Fix init and mistype of var