Main not working, freezes when launched