bugfix in new function; bugfix in test