Fixed some bugs by tweaking default argument values.