LB-1833: Fixed version.

For dev mode and also for production mode.
LB-1819: Fixed error when loging.

Check first if the response has an request object.