fix variable redeclartion