fixes #137 fixes #138 fixes #139