quite crappy workaround