Fix Tests and warning