[FIX] Security fixes for sql injections