Fix security issue & add table prefix