fixes timelines modal changed dialog

It should only appear when properly initialized. Problem was a javascript error thrown because of a call of close() on uninitialized dialog.