Fix datastructure