Fixed NPE when working with permits, fixed messages not being sent after server reboot when using UUID