fixes a couple of instant crashes