fixed global objects usage