fixed problem with not initilized variable