Resolves #54, must be tested.