some bugs fixed
minor fixes