attempted to avoid a crash bug; adjusted some things