Fixed crash that sometimes occurs when closing Media tab

due to unbalanced observation registration calls.