fixing some mischoose of types of variables