Fix minor issues with user defined variables