Serial data from arduino to processing does not update

When switching pins, the program still works as before. The right pins are set to be connected by Arduino but not in processing unless they touched from the start (when the program was started).