I think this is super hacky, but I actually don't have any better ideas atm :(