fixes #5 #7