Fixing delay issue