fix view model bugs

introduced in 0e6f6a38c9548b4b81e7f6d0a2d2e9432ecba918