We have had a lot of problems while working on this project.
We had had a lot of problems while working on this project.
I just want to clarify that the first sentence means that we are still working on the project, and the second means that we don't work on the project anymore. Is that correct? How do you understand these sentences?