Fixes exception when initializing preferences

when trying to run LogCat for the first time on my machine i ran into an exception. This pull request fixes that exception for me