Fixed compiler errors on certain targets

I'm still not sure what I should do before checkin exactly (which target, which tests for example). But I manually built every scheme this time.