trying to fix the crash that seems to happen when there are no active joints