fixed PLP memory leak