[toolkit] fixed bug when there is no external modules