BMW E87 N45 Solenoid Valves Built-in – Engine Problems!

Hello people, I have removed the solenoid valves of my E87 and replaced the seals, because it was slightly siffing from the inlet valve. I inserted the valves in wash gas and inserted new seals. After the first engine start the car sounded terrible, was terribly rattling and clacking and the speed fluctuated between 900 and 1100 revolutions. I checked cables several times, I think it is also connected correctly, otherwise the cables would be too kinked. i ch have the assumption that I have not put the valves in far enough, it may be that I have shot down the vanos or even the whole engine? I am grateful for any help!