Bug fix in preference Activity