Weird scope issue on live server