added label test and fixed associated errors