Added init handler so initial state matches viewmodel data