rearrange dtection, update GLPlugin