Better fix for #286