fixed branch hooks bug