Fixed major bug on edit page