Added compatibility to Android-8