fix variable setting