few changes and fixes