fix bug with versioning in assets() function; fix bug with onDestroy() behavior