Fixes #51 and Fixes #52.