fix error when pool is empty
add custom image loading