fix message handling in server backend