It seems this function always returns true since it crashes if you pass the wrong wrap mode -- is the return type useful for anything?