Fixes part of #222