fixed dublicate var initialisation