Additional patches by Mihai Moldovan via chan-capi-users