Leave project crash fix + confirmation dialog + refresh project state (fixes #13)