remove unused variables in spread transformer