Workaround for numpy bug