Fixes for upstream stdlib