Small fixes, fixed tests