fixes #145, fixes #146