Fixed part of #45