Fixing for compatibility with 1.7