fixed undifined var beging passed