Fixed a memory management issue where view model would get deallocated before unbinding.