fixed some potential exploits

also updated essential.php