Fixed bugs in api2/views