Fix a bug when you use inplace_static