Fixed some crashes

Now starts up, toolbar doesn’t work