Fixed javascript in availability to match both formatters