Cast type before assign.
Oh, forget to add test2..