Proper fixing of #81 and #82