attempt: fix bug in edit.php