fixes some issues on alamid_gui.php