a few Bugs fixed