misc: clean code, fix warning