bug with map unpacking fixed