rewrite of var in error