fixes #50, fixes #51