added exception handlign for gradient import