Increased compatibility to API > 9