Fix bug #1001536