Fixed release bug when released element is not valid