Disabling deprecated code differently.
Adding missing curly brace.