Fixed loggigng error