Fixed compilation errors
(Cannot refer to a non-final variable ...Text inside an inner class
defined in a different method)