bug in the check-depend method