fix type errors under Windows when using nm.take() function