fixed Linux-specific middleman impl