Fix bitbucket's implementation