Fixes #146. Fixes #150.