Fixed #56

The reordering fixes the exception. Not sure why order matters here but it does.