Q Deferred working in controller