fixed up crashing (a sort of fix)