Fixed bad error managing in the context creation
Fixed unset error codes