Fixes for #1123 and #1124

Like it says on the tin.