Fix api

fpaste with extra context: http://fpaste.org/114766/40424321/