Port fixes of #infomas/13