fixed global $this var from changing other values