Build Branch not updating for pull requests

I am running ‘0.8.4+build.1398’ integrated with bitbucket, the integrations seems to have started breaking from last few days, all the new builds have branch → refs/heads/master instead of the actual branch since last 2 weeks, causing our builds to fail.

Also the build status doesn’t always show up on all PR.

Would appreciate if someone can help me debug this further. I am guessing, there might have an API change in bitbucket.