Fixed static variable issue