Fixed bugs regarding inserting delays.
Merge branch 'devel'