fix the broken code