Fix for issue #583

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