Fix ajax controller that would access $shop->last_visited when null