fix some potential bugs