Sql injections update

Updated to avoid sql injections