fix problem with multiple functions called remove_small_ns()