optimize asset registering (thanks akodde)