fixed bug of smart pointer and smart array