bugfix to parsePost function