Merge changes to directive from master.