Made small changes for older Android version compatibility