Added better pcr handling