Fixed the crash in DrawActivity.