[BUG] For PS 2.0, due to wrong variables scopes.