slightly better fixes to close #330