fix where clause and JoinFn annotations