Improvement and bug fixed