this avoids some segfaults due to half constructed objects if an exception is thrown on initialization.