Fix #3264. Thanks @websemantics