github issues fixes (fix #7 fix #6 fix #5 fix #4 fix #1)