fixed the bug in prvious version