updated to fix crash bug on devices running android 5.0+