fix for compatibility with mac darwin compiler