Fix bug in fromCoordSystem

Closes #1387