couple of bug fixed