fixed bug in analytics api controllers