Fixes #5 #6 #10