Fixed problem with lazy threshold