Further fixes of #277
Further fixes of #279