Fixed bugs :(, still not working write