Fix for issue #583

To run the test

```python
from sunpy.tests import test
test()
```