Problem with functional dependencies