Fixed the UI Thread error