Fixed a crossthread violation exception