fixed references to data structures, so that they are referenced after initialization