fix bug if only one keyVariable is set
add required setnames()