bugfix in receive_data