fixed syntax error in posts controller