labels and some other bug fixes