fix layouts to work with different digits