fixing coluns/lines and width/height conditions