Fixed small code issue causing a lot spam in the log.