Call log function bug fix