fixes bug with multiple endpoints with same prefix Signed-off-by: Ramil Mirhasanov <ramil600@yahoo.com>