fix variable declarations