Trouble with using encoder and pid library together

This afternoon I looked at the code again, it seems the sprintf functions I was using for the lcd display was creating the problem. removing those has solved the problem. Btw, I've converted the code to use the ButtonEncoder library and it is a lot cleaner and simpler than what I originally had. However, it still didn't work properly when I added the PID library added and only after removing those sprintf functions did it start working. Thanks for the suggestion to use a library!