fix variable assignment