fix for am 1.14

patch from archlinux
https://bugs.archlinux.org/task/35907