fixed compile errors in vertical and horizontal layout