Update settings for release mode and avoid potential nullptr access