further fix for #287, temporary endpoint is cleaned up properly now