Fixed some minor bugs due to logging feature add