fixes #51, fixes #52