Fixed an embarrasing memmory write error.