some unimportant bugs fixed