fix ps syntax errors