better solution for #3027