Stopping infinit loop