Fix a bug there we would go into an infinit loop
More work and stuff