Fixed EMM-643 issue & updated SQL scripts