Changed some stuff so that it works