moved setController call to onprepared