Added check for empty href array