fixed a bug where SE were not being written