Fix error reporting during initialization