Fix #289
Fix #309
Fix #306
refs #290