There Aren't Any Nokocchi Here!? - S4-E34
Continuity mistake: When the Pokédex is giving facts on Dunsparce, Ash's right pinkie finger and the two above are past the left portion of it, but in the next shot, they are not. Also, the light on it goes from blue to red. (00:00:45)
There Aren't Any Nokocchi Here!? - S4-E34
Continuity mistake: When Ash uses his Pokédex, his right pinkie finger and the two above are not past the left part of it, but in the next shot, they are. (00:00:39)
Answer: He is a good guy but just found himself in a bad situation when he worked for Lysander. He didn't want him to harm Ash and his Pokémon when he was trying to get the special bond between Ash and his Greninja to work. He does leave Lysander and go back to being a good person.