Fixed some bugs ensue by reconfigurating