added a test and a bugfix for initial data transfer