fix populating of the level tables