All the bugz

Fixes for #428, #346, #375 and #385