fix available logic, remove js