Kinda hacky but it works.