Update setHeight function