Fix tests generation