Fixed trivial bugs