median row building fix