This feels super hacky and compact-specific. Wouldn't using one of the utils be cleaner here?