Fix library image initialise bug.