Fixed the "Bad error request" error.

By redefining self.parts it gets rid of all the previously added parts which cause the error. Worked for me after I added those two lines.