Added missing checks to certain remoteSetCode functions.