You should never try to perform string manipulation on userdata or hash since the format of these aren’t guaranteed to stay the same. There’s an excellent post by @jakob.pogulis describing why reverse hashing isn’t even available in release builds.
What you want to do is to compare actual URLs (because that is the kind of userdata object sender
is):
elseif message_id == hash('proxy_unloaded') then
if sender == msg.url("main:/loader#mainScreen") then
load_main(self)
end
end