fix custom for non-square