Security Fix & more

Fixed a sql injection and some more