Change branch checking logic

this is a not right place for that message