futher refine the bug fixing