Fixes from franciscofranco