Fixes for Darwin