Fixes back button from edit document