Trying to fix Access violation.