fix bug in filemanager and redirect