added require of objspace outside trap scope