fixed bugs in post-receive