Made avail show and hide correctly