Made it work for now, though kind of hacky