fixed trivial bugs, cosmetics