API level 7 compatibility issue fixed and minor improvements