fixes #16. fixes #23