fix reception of too short frames and add test for it