resolves #147, resolves #148, fixes #149