fixes #185 and fixes #186