fixed a bug where wrong data was received