fixed small initialisation bugs