Two bugfixes and a todo.