Closes #528