Fix github issues

fixes #86
fixes #87
fixes #89
fixes #90