fixed global vars