Fixed minor memory protection bug