Fixed lazy loading functionality