fixed some stuff in RM, added client error checking, and magic