fixed bug with FIN message