Fix bugs introduced in last commit. Now measures can chained even when measures are added after starting the engine. Editing a measure after putting it in the queue does cause the system to crash when starting anymore.