fix for duplicated lines in OS X