Fixed several bugs related to filesystem searches