some corrections and fixes