Moved nil settings check earlier in minimize to before settings is needed.