This fixes #1026.