misc: fixes #25, fixes #21