infinite loop in chech avail