Inspired by b79ab15859e7f8383526afd147e8416d2df2f7a7
Port 51310125051a75ef7af4e8ffc8b6532c151e96b6 to glitch