Added tests for map behaviour
fixed broken eventful query chain