fix index bugs. format single obs row (ticket 43)