Added on delete constraints, fixed fetch_row in keywords query`