Add horrible workarounds for tests