Fixes for small bugs