Fixed bugs with homepage queries