Initialise res to avoid compiler warnings