Changed some error handling a bit.

1 file changed