fixes previous commit and takes into account unexported fields