Fix some misc bugs for admin plugin