Fixed bug in frame size when receiving