added null terminator checks in maml_compiler