several fixes and sql scripts updated