fixed a bug in controllers that makes export go wrong