Remaking PR 229 by squidicuzz