npe fix for implicit intent

includes random color fix too