fixed ordering of obervations query