fixed broken code in an old post