fix broken code