Fixes for #295 #299 #300