struct assignment bug