Fix NumberFormatException in Preferences & NullPointer on DownloadReceiver