Fixed invalid mem access