added error checking for pulse sequence replacements