fix bug in dep detection