Fixed bug in receiver