Added check for empty.