Added checking for optional settings