fixed struct copying