To avoid bending valves, you need to make sure that the timing is correct. This can be done by using a timing light or by following the instructions in your vehicle's repair manual. If you are not confident in your ability to do this, you should take your vehicle to a qualified mechanic.