Replace @var per @staticvar when needed