Added null termination for the simple case