bug in fn.map fixed - passing empty array will result in empty array. Done is now called in this case