Corrected some logic to enable optional param avoiding breaking compat.