Merge changes from patricktokeeffe-issue78