Okay, there could be major immigration issues here. First, get a consultation with someone and run this fact pattern past the lawyer. Second, ask that lawyer to refer you to an immigration lawyer, so that you can discuss the potential ramifications of a conviction. You are innocent unless proven guilty, so right now I don't expect you to face a risk of deportation upon showing up to court. Then again, there may be things I don't know here.