Logic fix for bitbucket