Fixed issue update function in Directive