cherry-picked lorenz's fix for bullet