One more fix for #962, improve error code
Grrr unwanted change
One more fix for #1014