Merge branch 'fixes' into pm-sleep

The 'fixes' branch contains material the next commit depends on.