fixes #40 #43 #58 #59 #60