fix (?) for null pointer exception raised by some android apps; see
email by Damien Octeau