Fixed some issues with it running on servers.