Fixed broken code