fix ruei db scripts