Checking the program-id at the beginning and the end.