Fixed multiple entity mapping bug
Added tests for tag replacement