fixed ordering

closes #896