added checking for nil selection image