added some missed changes and update SQL