bugfix for wrapping, merged with mapjs