make it work on non-localhost environments