Some improvements for #213