Fix the bug of the availability checkbox