Fix get image function bug
PR 100