fixing bugs for bitbucket hook