add missing code to hide advanced options if unavailable