Thousands of gay marriages from Canada may not be legal