Fix build and a few receiver bugs