wrong error was returned in -3

Signed-off-by: Mattias Andrée <maandree@operamail.com>