Fix issue with invalid repo user for api call to bitbucket.

take a look for issue #502 for details