avoid logging twice