fix thread safety in Lee filter