charged with possession of a controlled substance and a failure to register as a transient sex offender