two bug fixed