Fixes for #1308