fixes #135 and fixes #215