fix for keeping activated button and rootFolder button updated in header, delete resource from db on cancel