fixed ajax bugs, working on edit action