Fixes, hopefully tests pass now.