Improve https://github.com/fog/fog/issues/2908 handler