Added compatibility for older Android versions