Fixes to build process following Black-4