fix submit and delete bugs