fix to run post hook script only once