Fixes #25, fixes #26