Fix state retrieval with branch name in travis