fix a bug + remove unused things