fixed missing provider dependency issue
code optimization