Fixed api tests (SQUASHME into 45773f)