first time initialization and fixes