Fixed issues with suspend code