Make small improvements in order to make the code to work well with an
Android version 2.2.1.