bugfix : type error related to $request object