fixing bug in refactored post