regression test for nested struct bug
fixed a bug with nested structs
fixed regression test
fixed function spec