Fixes #182
Work in progress