has_and_belongs_to_many was written incorrently in models