Changes from issue 168