Fix dependency checking