small modifications to post.sh script