fixes #200 and fixes #197