Added checks for remoteness of IM