More hacks for hacky code but this seems to resolve #31