Fixing setImmediate