Additional fixes for Apply, Commit button. Issue #20 should be fixed now
Fix SQL where clause