fixed bug with possible invalid icon