fixes for format 3.1.1 / agal2