FIxed bug with diracs.
Merge branch 'diracFix'