Fixing some API bugs and adding publish profile for admin console.