Added check, removing redundant code. Added advanced setting check.