Fixed Directive Bug

Fixed DIrective and Factorys