fixed minor bug with initialisation order