fixed a bug in mosel output code