Fixed invalid type warning (potential memory error).

Change-Id: I6c36e4b20e7b8bd5b0f7b459cfc071582db4fb1f