Fixed bug in applyPostParams