Fix bug while handling ping frames and using assemble mode. Also add a test-case