Fixing trivial bugs