Some fixes, after tests. All tests passed.