Fixed bug. Further polishing.