fixes and making some tests expect errors