Added Compatibility with API 8