Fixes for non-2.7