Added order by and limit to options for detail query