some fixes related to static fields and structs.