Set a default value and condition fix