Fix crashing on certain Samsung devices.

Samsung issue: https://code.google.com/p/android/issues/detail?id=60055