Fixed some file manager bugs