Modified code so it worked (it worked before?