fixing edit in spa