Fixed bug in post hook.