fixed total return from controller to js