Security bugs fixed