I feel like there is a more elegant fix than this, so please feel free to rip this apart.