Security bugs fixed

OOOO____OOOO luckily nobody malicious found out yet