Added spaces between if and opening brackets within pe-ap