fix bugs + multi extensiosn support