Change branch checking logic

@ildarsafin probably `message` prefix is redundant.