Minor clean up and possible crash fix.