fixes #3 #5