improved workaround