Fix most bugs, still fails hidden test 10. 13/14