Fixed not working code