fixes #40 #43 #58 #59 #60 #70 #71 #72 #73 #74